package ArrayList;

import java.util.ArrayList;

/**
 * User:浪尘
 * Date:2022-09-15
 * Time:18:38
 */
public class demo4 {
    public static void main(String[] args) {
        String str1 = "Study Du LingChenQi";
        String str2 = "LingChenQi";
        ArrayList<Character> s1 = new ArrayList<>();
        for (int i = 0; i < str1.length(); i++) {
            char ch = str1.charAt(i);
            if(!str2.contains(ch+"")){//因为contains传的是字符 加个""就可以
                s1.add(ch);
            }
        }
        System.out.println(s1);
    }
}
